local Class = require('lua.lang.Class')
local UnDumper = require('lua.vm.UnDumper')
local LoadState = require('lua.vm.LoadState')

--- @class GlobalsUnDumper : UnDumper
local GlobalsUnDumper = Class {
	__extends = UnDumper
}

--- @return GlobalsUnDumper
function GlobalsUnDumper:new()
	--- @type GlobalsUnDumper
	local o = {}
	return setmetatable(o, GlobalsUnDumper)
end

--- @param stream InputStream
--- @param chunkName string
--- @return Prototype
function GlobalsUnDumper:unDump(stream, chunkName)
	return LoadState:unDump(stream, chunkName, true)
end

return GlobalsUnDumper